/*
 * Copyright 2012 yura.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.opu.pcm.services.beans;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.opu.pc.services.beans.AbstractBean;

/**
 *
 * @author yura
 */
public class UserBean extends AbstractBean{
    
    public enum SecurityGroup {
        /** Can view data that already in system */
        Operator,
        /** Can generate statements */
        Secretary,
        /** Can uploads data about publications in to the system */
        Professor;
    }
    
	private String password;
	private String email;
    private List<SecurityGroup> securityGroups = new ArrayList<SecurityGroup>();

    public UserBean() {
    }

    public UserBean(int id, String name, String password, String email) {
        super(id, name);
        this.password = password;
        this.email = email;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public List<SecurityGroup> getSecurityGroups() {
        return securityGroups;
    }

    public void setSecurityGroups(List<SecurityGroup> securityGroups) {
        this.securityGroups = securityGroups;
    }

    public void setSecurityGroups(SecurityGroup... securityGroups) {
        this.securityGroups = new ArrayList<SecurityGroup>(Arrays.asList(securityGroups));
    }
    
}
